﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArkadiaOsKernel.Core.Filesystem.Vfs
{
    class File
    {

        //Name of the file.
        public string name = "";
        //Whats the files extension?
        public string filetype = "";
        //Files size, by defualt it is in bytes.
        public int size = 0;
        //Files data, a important part.
        public string data = "";
        public string description = "";
        //Where is this file stored?
        public Directory path = new Directory();
        //Size type
        public enum SizeType
        {
            Bytes,
            Kbs,
            Mbs
        };
        #region " File Handlers "
        public File()
        {
            //Blank file.
        }
        public File(string n, string d)
        {
            this.name = n;
            this.data = d;
        }
        public File(string n, string d, Directory dr)
        {
            this.name = n;
            this.data = d;
            this.path = dr;
        }
        public File(string n, string d, Directory dr,string de)
        {
            this.name = n;
            this.data = d;
            this.path = dr;
            this.description = de;
        }
        #endregion
        #region " File Managers "
        public void SetSize(SizeType size)
        {
            //Set the size in bytes.
            if (size == SizeType.Bytes)
            {
                this.size = this.data.Length;
            }
        }
        #endregion
    }
}
